home *** CD-ROM | disk | FTP | other *** search
- (*----------------------------------------------------------------------*)
- (* Color_Screen_Active --- Determine if color or mono screen *)
- (*----------------------------------------------------------------------*)
-
- FUNCTION Color_Screen_Active : BOOLEAN;
-
- (* *)
- (* Function: Color_Screen_Active *)
- (* *)
- (* Purpose: Determines if color or mono screen active *)
- (* *)
- (* Calling Sequence: *)
- (* *)
- (* Color_Active := Color_Screen_Active : BOOLEAN; *)
- (* *)
- (* Color_Active --- set to TRUE if the color screen is *)
- (* active, FALSE if the mono screen is *)
- (* active. *)
- (* *)
- (* Calls: INTR *)
- (* *)
-
- VAR
- Regs : RECORD (* 8088 registers *)
- Ax, Bx, Cx, Dx, Bp, Si, Di, Ds, Es, Flags : INTEGER;
- END;
-
- BEGIN (* Color_Screen_Active *)
-
- Regs.Ax := 15 SHL 8;
-
- INTR( $10 , Regs );
-
- Color_Screen_Active := ( Regs.Ax AND $FF ) <> 7;
-
- END (* Color_Screen_Active *);
-
- (*----------------------------------------------------------------------*)
- (* Get_Screen_Address --- Get address of current screen *)
- (*----------------------------------------------------------------------*)
-
- PROCEDURE Get_Screen_Address( VAR Actual_Screen : Screen_Ptr );
-
- (* *)
- (* Procedure: Get_Screen_Address *)
- (* *)
- (* Purpose: Gets screen address for current type of display *)
- (* *)
- (* Calling Sequence: *)
- (* *)
- (* Get_Screen_Address( VAR Actual_Screen : Screen_Ptr ); *)
- (* *)
- (* Actual_Screen --- pointer whose value receives the *)
- (* current screen address. *)
- (* *)
- (* Calls: Color_Screen_Active *)
- (* PTR *)
- (* *)
-
- BEGIN (* Get_Screen_Address *)
-
- IF Color_Screen_Active THEN
- Actual_Screen := PTR( Color_Screen_Address , 0 )
- ELSE
- Actual_Screen := PTR( Mono_Screen_Address , 0 );
-
- END (* Get_Screen_Address *);
-
- (*----------------------------------------------------------------------*)
- (* Set/Reset Text Color Routines *)
- (*----------------------------------------------------------------------*)
- (* *)
- (* These routines set and reset the global text foreground and *)
- (* background colors. *)
- (* *)
- (*----------------------------------------------------------------------*)
-
- (* Global Text Color Variables *)
-
- VAR
- Global_ForeGround_Color : INTEGER;
- Global_BackGround_Color : INTEGER;
-
- (*----------------------------------------------------------------------*)
- (* Set_Global_Colors --- Reset global foreground, background cols. *)
- (*----------------------------------------------------------------------*)
-
- PROCEDURE Set_Global_Colors( ForeGround, BackGround : INTEGER );
-
- (* *)
- (* Procedure: Set_Global_Colors *)
- (* *)
- (* Purpose: Sets global text foreground, background colors. *)
- (* *)
- (* Calling Sequence: *)
- (* *)
- (* Set_Global_Colors( ForeGround, BackGround : INTEGER ); *)
- (* *)
- (* ForeGround --- Default foreground color *)
- (* BackGround --- Default background color *)
- (* *)
- (* Calls: TextColor *)
- (* TextBackGround *)
- (* *)
-
- BEGIN (* Set_Global_Colors *)
-
- Global_ForeGround_Color := ForeGround;
- GLobal_BackGround_Color := BackGround;
-
- TextColor ( Global_ForeGround_Color );
- TextBackground( Global_BackGround_Color );
-
- END (* Set_Global_Colors *);
-
- (*----------------------------------------------------------------------*)
- (* Reset_Global_Colors --- Reset global foreground, background cols. *)
- (*----------------------------------------------------------------------*)
-
- PROCEDURE Reset_Global_Colors;
-
- (* *)
- (* Procedure: Reset_Global_Colors *)
- (* *)
- (* Purpose: Resets text foreground, background colors to global *)
- (* defaults. *)
- (* *)
- (* Calling Sequence: *)
- (* *)
- (* Reset_Global_Colors; *)
- (* *)
- (* Calls: TextColor *)
- (* TextBackGround *)
- (* *)
-
- BEGIN (* Reset_Global_Colors *)
-
- TextColor ( Global_ForeGround_Color );
- TextBackground( Global_BackGround_Color );
-
- END (* Reset_Global_Colors *);